add patches to ensure that the build-time tests act on the copy of ostree that we...
authorSimon McVittie <smcv@debian.org>
Sun, 26 Jun 2016 12:58:19 +0000 (13:58 +0100)
committerSimon McVittie <smcv@debian.org>
Sun, 26 Jun 2016 12:58:19 +0000 (13:58 +0100)
debian/changelog
debian/patches/series
debian/patches/tests-fail-the-build-if-symlinking-tests-ostree-fails.patch [new file with mode: 0644]
debian/patches/tests-use-our-own-generated-libtool-not-the-one-in-PATH.patch [new file with mode: 0644]

index 290fb4bccffe60f4f4a7976cb10c6bd05d5a5d2c..df5783b651dc01f0f73658adb9505510563cb5af 100644 (file)
@@ -16,6 +16,10 @@ ostree (2016.6-1) UNRELEASED; urgency=medium
   * d/p/pull-Correctly-handle-repo-parent_repo-when-applying-stat.patch:
     apply patch from upstream to fix a bug that flatpak currently works
     around
+  * d/p/tests-fail-the-build-if-symlinking-tests-ostree-fails.patch,
+    d/p/tests-use-our-own-generated-libtool-not-the-one-in-PATH.patch:
+    add patches to ensure that the build-time tests act on the copy
+    of ostree that we just built
 
  -- Simon McVittie <smcv@debian.org>  Wed, 15 Jun 2016 14:05:53 -0400
 
index ccc855066d5e9af5ff20fd5f8056e23adb6f7c43..0adf62aef068da263518b4e75b9f9211af9d34b1 100644 (file)
@@ -1,2 +1,4 @@
 libostree.sym-Fix-test-symbols.patch
 pull-Correctly-handle-repo-parent_repo-when-applying-stat.patch
+tests-use-our-own-generated-libtool-not-the-one-in-PATH.patch
+tests-fail-the-build-if-symlinking-tests-ostree-fails.patch
diff --git a/debian/patches/tests-fail-the-build-if-symlinking-tests-ostree-fails.patch b/debian/patches/tests-fail-the-build-if-symlinking-tests-ostree-fails.patch
new file mode 100644 (file)
index 0000000..cf3636f
--- /dev/null
@@ -0,0 +1,23 @@
+From: Simon McVittie <smcv@debian.org>
+Date: Sun, 26 Jun 2016 13:57:13 +0100
+Subject: tests: fail the build if symlinking tests/ostree fails
+
+Signed-off-by: Simon McVittie <smcv@debian.org>
+---
+ Makefile-tests.am | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile-tests.am b/Makefile-tests.am
+index 25b8202..9be9061 100644
+--- a/Makefile-tests.am
++++ b/Makefile-tests.am
+@@ -245,7 +245,8 @@ ALL_LOCAL_RULES += tests/libreaddir-rand.so
+ CLEANFILES += tests/libreaddir-rand.so tests/ostree-symlink-stamp tests/ostree
+ tests/ostree-symlink-stamp: Makefile
+-      @real_bin=`cd $(top_builddir) && ./libtool --mode=execute echo ostree`; \
++      @set -e; \
++      real_bin=`cd $(top_builddir) && ./libtool --mode=execute echo ostree`; \
+       ln -sf "$${real_bin}" tests/ostree; \
+       touch $@
diff --git a/debian/patches/tests-use-our-own-generated-libtool-not-the-one-in-PATH.patch b/debian/patches/tests-use-our-own-generated-libtool-not-the-one-in-PATH.patch
new file mode 100644 (file)
index 0000000..f55c8db
--- /dev/null
@@ -0,0 +1,35 @@
+From: Simon McVittie <smcv@debian.org>
+Date: Sun, 26 Jun 2016 13:56:05 +0100
+Subject: tests: use our own generated libtool, not the one in $PATH
+
+libtoolize creates a version of libtool for the right architecture
+in $(top_builddir), which is guaranteed to be present, and is
+guaranteed to match what we are compiling (even during
+cross-compilation).
+
+Packaging systems sometimes separate /usr/bin/libtool, which is
+specific to one architecture, from the libtool development files
+such as libtoolize and ltmain.sh, which are architecture-independent.
+For example, in Debian, libtool_*_all.deb contains the files necessary
+to libtoolize a package and is depended on by the dh-autoreconf package,
+but libtool-bin_*_amd64.deb (or whatever architecture) contains
+/usr/bin/libtool and is not normally necessary to depend on.
+
+Signed-off-by: Simon McVittie <smcv@debian.org>
+---
+ Makefile-tests.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile-tests.am b/Makefile-tests.am
+index 8090307..25b8202 100644
+--- a/Makefile-tests.am
++++ b/Makefile-tests.am
+@@ -245,7 +245,7 @@ ALL_LOCAL_RULES += tests/libreaddir-rand.so
+ CLEANFILES += tests/libreaddir-rand.so tests/ostree-symlink-stamp tests/ostree
+ tests/ostree-symlink-stamp: Makefile
+-      @real_bin=`cd $(top_builddir) && libtool --mode=execute echo ostree`; \
++      @real_bin=`cd $(top_builddir) && ./libtool --mode=execute echo ostree`; \
+       ln -sf "$${real_bin}" tests/ostree; \
+       touch $@